package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchFilterOptionMapper;
import com.ruoyi.system.domain.DispatchFilterOption;
import com.ruoyi.system.service.IDispatchFilterOptionService;

/**
 * 筛选选项Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchFilterOptionServiceImpl implements IDispatchFilterOptionService 
{
    @Autowired
    private DispatchFilterOptionMapper dispatchFilterOptionMapper;

    /**
     * 查询筛选选项
     * 
     * @param filterOptionId 筛选选项主键
     * @return 筛选选项
     */
    @Override
    public DispatchFilterOption selectDispatchFilterOptionByFilterOptionId(Long filterOptionId)
    {
        return dispatchFilterOptionMapper.selectDispatchFilterOptionByFilterOptionId(filterOptionId);
    }

    /**
     * 查询筛选选项列表
     * 
     * @param dispatchFilterOption 筛选选项
     * @return 筛选选项
     */
    @Override
    public List<DispatchFilterOption> selectDispatchFilterOptionList(DispatchFilterOption dispatchFilterOption)
    {
        return dispatchFilterOptionMapper.selectDispatchFilterOptionList(dispatchFilterOption);
    }

    /**
     * 新增筛选选项
     * 
     * @param dispatchFilterOption 筛选选项
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchFilterOption(DispatchFilterOption dispatchFilterOption)
    {
        return dispatchFilterOptionMapper.insertDispatchFilterOption(dispatchFilterOption);
    }

    /**
     * 修改筛选选项
     * 
     * @param dispatchFilterOption 筛选选项
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchFilterOption(DispatchFilterOption dispatchFilterOption)
    {
        return dispatchFilterOptionMapper.updateDispatchFilterOption(dispatchFilterOption);
    }

    /**
     * 批量删除筛选选项
     * 
     * @param filterOptionIds 需要删除的筛选选项主键
     * @return 结果
     */
    @Override
    public int deleteDispatchFilterOptionByFilterOptionIds(Long[] filterOptionIds)
    {
        return dispatchFilterOptionMapper.deleteDispatchFilterOptionByFilterOptionIds(filterOptionIds);
    }

    /**
     * 删除筛选选项信息
     * 
     * @param filterOptionId 筛选选项主键
     * @return 结果
     */
    @Override
    public int deleteDispatchFilterOptionByFilterOptionId(Long filterOptionId)
    {
        return dispatchFilterOptionMapper.deleteDispatchFilterOptionByFilterOptionId(filterOptionId);
    }
}
